<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import OnlineStatusEnum from '@/framework/constant/OnlineStatusEnum'
import CheckStatusEnum from '@/infra/constant/CheckStatusEnum'
import WeightTypeEnum from '@/feature/pdt/infra/constants/WeightTypeEnum'
import YesNoEnum from '@/infra/constant/YesNoEnum'
import { spuApi } from '@/feature/pdt/infra/api/spuApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: spuApi,
        columns: [
          {
            label: '商品信息',
            searchable: true,
            width: 300,
            required: true,
            prop: 'title'
          },
          {
            label: '当前价',
            prop: 'price'
          },
          {
            label: '商品主图',
            prop: 'mainImg'
          },
          // {
          //   label: '市场价',
          //   prop: 'marketPrice'
          // },
          {
            label: '累计销量',
            prop: 'sales',
            type: ColumnType.NUMBER
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          }
          // {
          //   label: '审核状态',
          //   searchable: true,
          //   type: ColumnType.SELECT,
          //   hiddenInForm: true,
          //   options: CheckStatusEnum,
          //   prop: 'checkStatus'
          // },
          // {
          //   label: '审核备注',
          //   prop: 'checkRemark'
          // },
          // {
          //   label: '物流重量类型',
          //   prop: 'weightType',
          //   type: ColumnType.RADIO,
          //   options: WeightTypeEnum
          // },
          // {
          //   label: '是否自营商品',
          //   prop: 'selfSupportFlag',
          //   type: ColumnType.RADIO,
          //   options: YesNoEnum
          // },
          // {
          //   label: '重量(kg)',
          //   prop: 'weight'
          // }
        ]
      }
    }
  },
  methods: {}
}
</script>

